<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .mail{
            width: 530px;
            /* height: 400px; */
            outline: 1px solid red;
            position: absolute;
            left: 50%;
            top: 70%;
            transform: translate(-50%,-50%);
            transition: 0.5s;
        }
        .mail::before{
            content: url(./img/before.png);
            position: absolute;
            top: -150px;
            z-index: -1;
        }
        .mail::after{
            content: url(./img/after.png);
            position: absolute;
            bottom: 0px;

        }
        .form-wrap{
            width: 450px;
            padding:0 40px;
            height: 300px;
            /* background-color: rgb(248, 121, 121); */
            box-sizing: border-box;
            background-origin: content-box;
            position: relative;
            /* background-color: rgb(245, 39, 39); */
            
        }
        .form-wrap form{
            width: 100%;
            height: 300px;
            padding: 20px;
            background-color: rgb(198, 238, 192);
            box-sizing: border-box;
            position: absolute;
            bottom: 10px;
            transition: 0.5s;
        }
        .mail:hover .form-wrap form{
            bottom: 100px;
            height: 600px;
        }
        .mail:hover{
            transform: translate(-50%,-20%);
        }
;
    </style>
</head>
<body>
    <div class="mail">
        <div class="form-wrap">
            
            <form action="">
                <h2>mail</h2>
                <input type="text"><br>
                <textarea name="" id="" cols="30" rows="10"></textarea>
            </form>
        </div>
    </div>
</body>
</html>